// =======================================================================================
/*!
 * @file    Defs.h
 *
 * @brief   General definitions.
 *
 * @author  Jorge Ramos (jramos at pobox dot com).
 *
 * @version 1.0.0.0 - May 23, 2011.
 *          @li Initial version.
 *
 * @remarks Copyright (c) 2011 Jorge Ramos.
 *
 * @remarks This software is provided 'as-is', without any express or implied warranty.
 *          Use it at your own risk. In no event shall the authors or copyright holders
 *          be held liable for any damages arising from the use of this software. Use
 *          and redistribution in source and binary forms, with or without modification,
 *          are permitted. Altered source versions must be plainly marked as such.
 *
 * @remarks This software is distributed in the hope that it will be useful, but WITHOUT
 *          ANY WARRANTY.
 */
// =======================================================================================

#ifndef _Defs_H_DA9444C8_6649_11DF_B321_0003FFCCBD00_
#define _Defs_H_DA9444C8_6649_11DF_B321_0003FFCCBD00_

#ifdef _MSC_VER
#pragma once
#endif

//////////////////////////////////////////////////////////////////////////////////////////

#ifdef _UNICODE
#ifndef UNICODE
#define UNICODE
#endif
#endif

#ifdef _MSC_VER
#pragma warning (disable: 4115)     /* named type definition in parentheses */
#pragma warning (disable: 4127)     /* conditional expression is constant */
#pragma warning (disable: 4201)     /* nonstandard extension used : nameless struct/union */
#pragma warning (disable: 4505)     /* unreferenced local function has been removed */
#pragma warning (disable: 4514)     /* unreferenced inline function has been removed */
#pragma warning (disable: 4702)     /* unreachable code */
#endif

#ifndef STRICT
#define STRICT                      /* Enable STRICT type checking. */
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stddef.h>
#include <ctype.h>
#include <time.h>
#include <errno.h>
#include <limits.h>
#include <math.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <setjmp.h>
#include <assert.h>

#include <float.h>
#include <conio.h>
#include <io.h>
#include <sys/locking.h>
#include <malloc.h>
#include <direct.h>
#include <process.h>

#ifdef _MSC_VER
#pragma warning (push)
#include <windows.h>
#include <windowsx.h>
#pragma warning (pop)
#else
#include <windows.h>
#include <windowsx.h>
#endif

#include <tchar.h>

#ifdef _MSC_VER
#include <crtdbg.h>
#endif

// Workaround to compile with some old headers.

#ifndef INVALID_SET_FILE_POINTER
#define INVALID_SET_FILE_POINTER ((DWORD)-1)
#endif

#ifndef INVALID_FILE_ATTRIBUTES
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
#endif

#ifndef DS_SHELLFONT
#define DS_SHELLFONT (DS_SETFONT|DS_FIXEDSYS)
#endif

#ifndef __int3264

#ifdef _WIN64
typedef __int64 LONG_PTR, *PLONG_PTR;
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
#else
typedef long LONG_PTR, *PLONG_PTR;
typedef unsigned long ULONG_PTR, *PULONG_PTR;
#endif

typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;

#endif

// Not sure if this works for everyone (it's working for my VC6 & VS2005).

#ifndef MAXLONG_PTR
typedef BOOL DLGPROC_RETVAL;
#else
typedef INT_PTR DLGPROC_RETVAL;
#endif

//////////////////////////////////////////////////////////////////////////////////////////

#endif

// =======================================================================================
